// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 此处后端没有提供注释 POST /orderDetail/add */
export async function addDetail(
  body: MallService.BizOrderDetail,
  options?: { [key: string]: any }
) {
  return request<MallService.ResultString>(`/mall/orderDetail/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /orderDetail/batch */
export async function addDetails(
  body: MallService.BizOrderDetail[],
  options?: { [key: string]: any }
) {
  return request<MallService.ResultString>(`/mall/orderDetail/batch`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /orderDetail/byOrder/${param0} */
export async function getByOrderNo(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MallService.getByOrderNoParams,
  options?: { [key: string]: any }
) {
  const { orderNo: param0, ...queryParams } = params
  return request<MallService.ResultListBizOrderDetail>(`/mall/orderDetail/byOrder/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 DELETE /orderDetail/deletebyid/${param0} */
export async function deleteDetail(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MallService.deleteDetailParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<MallService.ResultString>(`/mall/orderDetail/deletebyid/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /orderDetail/searchbyid/${param0} */
export async function getDetail(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MallService.getDetailParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<MallService.ResultBizOrderDetail>(`/mall/orderDetail/searchbyid/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 PUT /orderDetail/update */
export async function updateDetail(
  body: MallService.BizOrderDetail,
  options?: { [key: string]: any }
) {
  return request<MallService.ResultString>(`/mall/orderDetail/update`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
